package com.roamcattery.plugins.constant;

/**
 * @author wangwc@wumart.com
 * @version v1.0.0
 * @date 2022-7-1 11:01
 */
public class PropertyConstant {

    public static final String generator_config = "generatorConfig";
    public static final String dataSource_config = "dataSourceConfig";
    public static final String global_config = "globalConfig";
    public static final String package_config = "packageConfig";
    public static final String strategy_config = "strategyConfig";
    public static final String customize_config = "customizeConfig";
    public static final String url = "url";
    public static final String driver_name = "driverName";
    public static final String username = "username";
    public static final String password = "password";
    public static final String property = "property";
    public static final String name = "name";
    public static final String value = "value";
    public static final String file_setting = "fileSetting";
    public static final String output_dir = "outputDir";
    public static final String file_override = "fileOverride";
    public static final String open = "open";
    public static final String enable_cache = "enableCache";
    public static final String author = "author";
    public static final String entity_setting = "entitySetting";
    public static final String id_type = "idType";
    public static final String date_type = "dateType";
    public static final String base_column_list = "baseColumnList";
    public static final String base_result_map = "baseResultMap";
    public static final String swagger2 = "swagger2";

    public static final String parent = "parent";
    public static final String module_name = "moduleName";
    public static final String entity = "entity";
    public static final String mapper = "mapper";
    public static final String service = "service";
    public static final String service_impl = "serviceImpl";
    public static final String controller = "controller";

    public static final String naming = "naming";
    public static final String column_naming = "columnNaming";
    public static final String entity_lombok_model = "entityLombokModel";
    public static final String rest_controller_style = "restControllerStyle";
    public static final String controller_mapping_hyphen_style = "controllerMappingHyphenStyle";
    public static final String table_prefix = "tablePrefix";
    public static final String entity_boolean_column_remove_is_prefix = "entityBooleanColumnRemoveIsPrefix";
    public static final String entity_column_constant = "entityColumnConstant";
    public static final String include = "include";
    public static final String table = "table";

    public static final String xml_file_out_path = "xmlFileOutPath";
    public static final String xml_template_path = "xmlTemplatePath";
    public static final String file_map = "fileMap";
    public static final String req = "req";
    public static final String resp = "resp";
    public static final String biz_service = "bizService";
    public static final String biz_service_impl = "bizServiceImpl";
    public static final String file_package = "filePackage";
    public static final String file_name = "fileName";
    public static final String file_template = "fileTemplate";
    public static final String param = "param";
    public static final String file = "file";

    public interface PropertiesInteface{

        String getProperty();
    }

    public enum  DataSourceConfigProperties implements PropertiesInteface{
        URL(PropertyConstant.url),
        DRIVER_NAME(PropertyConstant.driver_name),
        USERNAME(PropertyConstant.username),
        PASSWORD(PropertyConstant.password),
        ;
        private String property;

        DataSourceConfigProperties(String property) {
            this.property = property;
        }

        @Override
        public String getProperty() {
            return this.property;
        }
    }
    public enum  GlobalConfigProperties implements PropertiesInteface{
        OUTPUT_DIR(PropertyConstant.output_dir),
        OPEN(PropertyConstant.open),
        FILE_OVERRIDE(PropertyConstant.file_override),
        AUTHOR(PropertyConstant.author),
        ENABLE_CACHE(PropertyConstant.enable_cache),
        ID_TYPE(PropertyConstant.id_type),
        DATE_TYPE(PropertyConstant.date_type),
        BASE_COLUMN_LIST(PropertyConstant.base_column_list),
        BASE_RESULT_MAP(PropertyConstant.base_result_map),
        SWAGGER2(PropertyConstant.swagger2),
        ;
        private String property;
        GlobalConfigProperties(String property) {
            this.property = property;
        }
        @Override
        public String getProperty() {
            return this.property;
        }
    }
    public enum  PackageConfigProperties implements PropertiesInteface{
        PARENT(PropertyConstant.parent),
        MODULE_NAME(PropertyConstant.module_name),
        ENTITY(PropertyConstant.entity),
        MAPPER(PropertyConstant.mapper),
        SERVICE(PropertyConstant.service),
        SERVICE_IMPL(PropertyConstant.service_impl),
        CONTROLLER(PropertyConstant.controller),
        ;
        private String property;
        PackageConfigProperties(String property) {
            this.property = property;
        }
        @Override
        public String getProperty() {
            return this.property;
        }
    }
    public enum  StrategyConfigProperties implements PropertiesInteface{
        NAMING(PropertyConstant.naming),
        COLUMN_NAMING(PropertyConstant.column_naming),
        ENTITY_LOMBOK_MODEL(PropertyConstant.entity_lombok_model),
        REST_CONTROLLER_STYLE(PropertyConstant.rest_controller_style),
        CONTROLLER_MAPPING_HYPHEN_STYLE(PropertyConstant.controller_mapping_hyphen_style),
        TABLE_PREFIX(PropertyConstant.table_prefix),
        ENTITY_BOOLEAN_COLUMN_REMOVE_IS_PREFIX(PropertyConstant.entity_boolean_column_remove_is_prefix),
        ENTITY_COLUMN_CONSTANT(PropertyConstant.entity_column_constant),
        INCLUDE(PropertyConstant.include),
        ;
        private String property;
        StrategyConfigProperties(String property) {
            this.property = property;
        }
        @Override
        public String getProperty() {
            return this.property;
        }
    }
    public enum  CustomizeConfigProperties implements PropertiesInteface{
        XML_FILE_OUT_PATH(PropertyConstant.xml_file_out_path),
        XML_TEMPLATE_PATH(PropertyConstant.xml_template_path),
        FILE_MAP(PropertyConstant.file_map),
        PARAM(PropertyConstant.param),
        ;
        private String property;
        CustomizeConfigProperties(String property) {
            this.property = property;
        }
        @Override
        public String getProperty() {
            return this.property;
        }
    }

}
